package com.patchmanage.back.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author huizhao
 * @since 2021-07-14
 */
@ApiModel(value="Inventory对象", description="")
public class Inventory implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "资产ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "资产业务id")
    private String sId;

    @ApiModelProperty(value = "资产名称")
    private String name;

    @ApiModelProperty(value = "所属部门")
    private Integer department;

    @ApiModelProperty(value = "组织部门名称")
    private String departmentName;

    @ApiModelProperty(value = "ip地址")
    private String ip;

    @ApiModelProperty(value = "mac地址")
    private String mac;

    @ApiModelProperty(value = "适配操作系统（1Windows，2linux  centos，3Linux  ubuntu）")
    private String os;

    @ApiModelProperty(value = "安全等级(0-安全 1-低危 2-中危 3-高危)")
    private Integer safeLv;

    @ApiModelProperty(value = "未打补丁数量")
    private Integer unpatchNum;

    @ApiModelProperty(value = "所属人")
    private String owner;

    @ApiModelProperty(value = "发现时间")
    private LocalDateTime disTime;

    @ApiModelProperty(value = "组id")

    @TableField(strategy = FieldStrategy.IGNORED)
    private Integer groupId;

    @ApiModelProperty(value = "是否测试(0未测试1已测试)")
    private Integer isTest;

    @ApiModelProperty(value = "是否可用（0不可用1可用 2未配置 -1异常）")
    private Integer isAvailable;

    private String username;

    private String password;

    @ApiModelProperty(value = "主机名")
    private String hostname;

    private LocalDateTime utime;

    @ApiModelProperty(value = "上一次未打补丁数量")
    private Integer lastUnpatchNum;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getsId() {
        return sId;
    }

    public void setsId(String sId) {
        this.sId = sId;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public Integer getDepartment() {
        return department;
    }

    public void setDepartment(Integer department) {
        this.department = department;
    }
    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }
    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }
    public Integer getSafeLv() {
        return safeLv;
    }

    public void setSafeLv(Integer safeLv) {
        this.safeLv = safeLv;
    }
    public Integer getUnpatchNum() {
        return unpatchNum;
    }

    public void setUnpatchNum(Integer unpatchNum) {
        this.unpatchNum = unpatchNum;
    }
    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }
    public LocalDateTime getDisTime() {
        return disTime;
    }

    public void setDisTime(LocalDateTime disTime) {
        this.disTime = disTime;
    }
    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }
    public Integer getIsTest() {
        return isTest;
    }

    public void setIsTest(Integer isTest) {
        this.isTest = isTest;
    }
    public Integer getIsAvailable() {
        return isAvailable;
    }

    public void setIsAvailable(Integer isAvailable) {
        this.isAvailable = isAvailable;
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    public String getHostname() {
        return hostname;
    }

    public void setHostname(String hostname) {
        this.hostname = hostname;
    }
    public LocalDateTime getUtime() {
        return utime;
    }

    public void setUtime(LocalDateTime utime) {
        this.utime = utime;
    }
    public Integer getLastUnpatchNum() {
        return lastUnpatchNum;
    }

    public void setLastUnpatchNum(Integer lastUnpatchNum) {
        this.lastUnpatchNum = lastUnpatchNum;
    }

    @Override
    public String toString() {
        return "Inventory{" +
                "id=" + id +
                ", sId=" + sId +
                ", name=" + name +
                ", department=" + department +
                ", departmentName=" + departmentName +
                ", ip=" + ip +
                ", mac=" + mac +
                ", os=" + os +
                ", safeLv=" + safeLv +
                ", unpatchNum=" + unpatchNum +
                ", owner=" + owner +
                ", disTime=" + disTime +
                ", groupId=" + groupId +
                ", isTest=" + isTest +
                ", isAvailable=" + isAvailable +
                ", username=" + username +
                ", password=" + password +
                ", hostname=" + hostname +
                ", utime=" + utime +
                ", lastUnpatchNum=" + lastUnpatchNum +
                "}";
    }
}
